POV-Ray : Newsgroups : povray.binaries.images : Rope Macro : Re: Rope Macro Server Time
5 Nov 2024 11:19:25 EST (-0500)
  Re: Rope Macro  
From: Chris B
Date: 28 May 2009 08:08:40
Message: <4a1e7ec8@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> wrote in message 
news:web.4a1e750b99a5bfb66dd25f0b0@news.povray.org...
> "Chris B" <nom### [at] nomailcom> wrote:
>> I'm working on a new Rope macro ...
>
> How are you doing the knots, with predefined knot curves?

Each knot has it's own little macro that tracks displacements through the 
path of the knot, factoring in the thickness of the rope and the tightness 
of the knot. The knot macros add points into an array which is built up to 
define the total path of the rope, then there's another macro to convert the 
array of points into one or more splines and the splines into the rope. 
Because you can break a rope into separate splines you can build adjacent 
segments of the same rope using different spline types.

> And can you handle e.g. coiling automatically?

There's a macro to add rope spirals with a configurable amount of 
randomness. It'll do left or right handed spirals, so it should be quite 
easy to add a coil of rope. I'll give that a go :o).

> And presumably you're using either catenaries or a
> full mechanics simulation to produce hanging curves...?

Ahh! Nothing nearly so sophisticated there I'm afraid :-). I have a loose 
segment macro that takes the current point and a new point and adds an extra 
point in between roughly in the right place to bring the rope length to 
approximately the value specified as a parameter and to get the lowest point 
roughly where it should be for the relative heights of the two end points. 
Then it relies upon using a curved spline for that segment of rope to join 
the dots in a fairly gravity compliant way. There's nothing stopping anyone 
with a better grip on the maths adding such a macro though. Each of the 
path-defining macros is quite short, so it doesn't take long to add new 
shape macros.

Regards,
Chris B.


Post a reply to this message


Attachments:
Download 'rope_14.jpg' (10 KB) Download 'rope_15.jpg' (18 KB)

Preview of image 'rope_14.jpg'
rope_14.jpg

Preview of image 'rope_15.jpg'
rope_15.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.